home *** CD-ROM | disk | FTP | other *** search
- 0, In this animation, you will learn how transactions
- 6, and ActiveX server components are processed by
- 8, Microsoft Transaction Server. In this scenario, a
- 13, user enters a request from a Web page to transfer
- 16, $100 from a checking account to a savings account.
- 21, When the request is received, an Activer Server Page
- 24, runs and creates a transfer object to transfer the
- 28, money. You write the transfer object, which is an
- 31, ActiveX server component. When the transfer object
- 35, is called, Microsoft Transaction Server
- 39, automatically creates a Context object. Whenever an object
- 45, is created in Microsoft Transaction Server an
- 48, associated Context object is also created. The
- 53, Context object manages the context for the object. The
- 58, transfer object requires a transaction and the
- 62, Context object creates the transaction. The context of
- 68, a transaction is shared across all objects
- 71, involved in the transaction. And, the context ends when
- 75, the transfer object is finished running. Any work
- 79, done inside the transaction is buffered until all
- 83, objects commit or an object aborts. The transfer
- 89, object requires and creates two additional objects
- 93, to complete its work: debit, and credit. These
- 97, objects are also ActiveX server components. When a
- 101, transaction exists, the context of the transaction
- 105, extends to include the credit object in the
- 108, existing transaction. In this scenario, the credit object adds
- 112, $100 to the savings account. When the change is
- 117, finished, the credit object indicates that it has
- 120, completed its task successfully in the context of the
- 123, transaction. The transfer object then creates the
- 128, debit object, which is also incorporated in the
- 131, existing transaction. The debit object subtracts
- 135, $100 from the checking account. When the change is
- 138, finished the debit object also indicates that it
- 142, has completed its task successfully in the context
- 145, of the transaction. Finally, the transfer object
- 149, indicates that it has completed its work. All
- 153, objects in the transaction have completed successfully,
- 157, so the transaction can commit and the database
- 159, changes are permanent. If any object in the
- 163, transaction fails to complete its work successfully, the
- 167, transaction aborts. For example, even though the
- 171, credit object may succeed, the debit object may
- 174, fail because the checking account has a zero balance. Money
- 178, cannot be taken from an empty account so the debit
- 181, object indicates that it has to abort. Once all
- 187, objects have finished running, the transaction rolls
- 190, back to undo the changes made by the credit
- 192, object. Because the debit object has aborted, the
- 196, credit object cannot commit and the integrity of the
- 199, database is protected.
- 202, END